﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Rsa.DataAccess;
using Rsa.DataAccess.Models;
using System.Configuration;

namespace Rsa.Controllers.ContactoControllers
{
    public class ContactoController : Controller
    {
        //
        // GET: /Contact/
        ListaContactoDa listada=new ListaContactoDa(ConfigurationManager.ConnectionStrings["RsaDb"].ConnectionString);
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult ListaContacto (ListaContactos lista)
        {
            if (ModelState.IsValid)
            {
                listada.adicionarLista(lista);
            }
            return RedirectToAction("Index","Contacto");
        }
    }
}
